package triangleindex;
import java.util.ArrayList;
import java.util.HashMap;


public class TriangleIndex {
		
//	ArrayList<surface> faces = new ArrayList<surface>();
	HashMap<Integer, surface> faces = new HashMap<Integer,surface>();
	HashMap<Integer, edge> edges = new HashMap<Integer,edge>();


  //  HashMap edge = new HashMap();

    // store all the edge, should be 30
    // to be notice, the edge can also be added automatically by "checking five"
    // but here, we use "checking five" to test
    
    public TriangleIndex(){
    	
    edges.put(1, new edge(1,2));
    edges.put(2, new edge(1,3));
    edges.put(3, new edge(1,4));
    edges.put(4, new edge(1,5));
    edges.put(5, new edge(1,6));
    edges.put(6, new edge(2,3));
    edges.put(7, new edge(2,6));
    edges.put(8, new edge(2,7));
    edges.put(9, new edge(2,8));
    edges.put(10, new edge(3,4));
    edges.put(11, new edge(3,8));
    edges.put(12, new edge(3,9));
    edges.put(13, new edge(4,5));
    edges.put(14, new edge(4,9));
    edges.put(15, new edge(4,10));
    edges.put(16, new edge(5,6));
    edges.put(17, new edge(5,10));
    edges.put(18, new edge(5,11));
    edges.put(19, new edge(6,7));
    edges.put(20, new edge(6,11));
    edges.put(21, new edge(7,8));
    edges.put(22, new edge(7,11));
    edges.put(23, new edge(7,12));
    edges.put(24, new edge(8,9));
    edges.put(25, new edge(8,12));
    edges.put(26, new edge(9,10));
    edges.put(27, new edge(9,12));
    edges.put(28, new edge(10,11));
    edges.put(29, new edge(10,12));
    edges.put(30, new edge(11,12));
    
    //now we add the faces, we have 20 faces
    
    faces.put(1, new surface(1,2,3,1,6,2));    
    faces.put(2, new surface(1,2,6,1,7,5));
    faces.put(3, new surface(1,5,6,4,16,5));
    faces.put(4, new surface(1,5,4,4,3,13));
    faces.put(5, new surface(1,3,4,2,3,10));
    
    faces.put(6, new surface(3,4,9,10,14,12));
    faces.put(7, new surface(3,9,8,12,24,11));
    faces.put(8, new surface(3,8,2,6,11,9));
    faces.put(9, new surface(2,8,7,9,21,8));
    faces.put(10, new surface(2,7,6,8,19,7));
    
    faces.put(11, new surface(4,5,10,13,15,17));
    faces.put(12, new surface(4,10,9,15,14,26));
    faces.put(13, new surface(5,6,11,16,20,18)); 
    faces.put(14, new surface(5,11,10,18,17,28));
    faces.put(15, new surface(6,7,11,19,22,20));
    
    faces.put(16, new surface(7,8,12,21,25,23));
    faces.put(17, new surface(7,12,11,23,30,22));
    faces.put(18, new surface(8,9,12,24,27,25));
    faces.put(19, new surface(9,10,12,26,29,27));
    faces.put(20, new surface(10,11,12,28,30,29));

    }
}


class surface{
	
	private int node_a;
	private int node_b;
	private int node_c;
	private int edge_id1;
	private int edge_id2;
	private int edge_id3;
	
	public surface(int i, int j, int k, int l, int m, int n) {
		// TODO Auto-generated constructor stub
		this.node_a = i;
		this.node_b = j;
		this.node_c = k;
		this.edge_id1 = l;
		this.edge_id2 = m;
		this.edge_id3 = n;
	}
	
	public int getNode_a()
	{
		return this.node_a;
	}
	
	public int getNode_b()
	{
		return this.node_b;
	}
	
	public int getNode_c()
	{
		return this.node_c;
	}
	
	public int getEdge_id1()
	{
		return this.edge_id1;
	}
   
	public int getEdge_id2()
	{
		return this.edge_id2;
	}
	
	public int getEdge_id3()
	{
		return this.edge_id3;
	}
	
}

class edge{

	int node_a;
	int node_b;
	
	public edge(int i, int j) {
		// TODO Auto-generated constructor stub
		this.node_a = i;
		this.node_b = j;
	}


	public int getNode_a()
	{
		return this.node_a;
	}
	
	public int getNode_b()
	{
		return this.node_b;
	}
}